<template>
  <div>
    <tables ref="tables" editable :pageShow="false" :border="true" v-model="roleList" :columns="columns"/>
  </div>
</template>
<script>
import Tables from "_c/tables";
import { roleB } from "@/api/data";
export default {
  name: "Account",
  components: {
    tables: Tables
  },
  data() {
    return {
      roleList: [],
      // 条件
      condition: {
        pageNum: 1,
        pageSize: 10
      },
      // table表头
      columns: [
        {
          type: "index",
          width: 60,
          align: "center",
          key: ""
        },
        {
          title: "角色名称",
          key: "rname"
        }
      ]
    };
  },
  mounted() {
    this.ListRole();
  },
  methods: {
    ListRole() {
      roleB().then(res => {
        if (res.code==1) {
        this.roleList = res.data;
        }
      });
    }
  }
};
</script>
